-- GENERATED SPELL FOR [Azure Spellbinder] --


function spell0_27635(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(50702,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27635', 2500, 1)
end

function spell1_27635(pUnit, Event) --@Arcane Volley,n/a--
pUnit:FullCastSpellOnTarget(59212,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27635', 2500, 1)
end

function spell2_27635(pUnit, Event) --@Mind Warp,n/a--
pUnit:FullCastSpellOnTarget(38047,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27635', 10000, 1)
end

function spell3_27635(pUnit, Event) --@Mind Warp,n/a--
pUnit:FullCastSpellOnTarget(50566,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27635', 10000, 1)
end

function spell4_27635(pUnit, Event) --@Power Sap,n/a--
pUnit:FullCastSpellOnTarget(50572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27635', 5000, 1)
end

function Sorts_27635(pUnit, Event)
local choix_sorts_27635 = math.random(0, 4)
if choix_sorts_27635 == 0 then
pUnit:RegisterEvent('spell0_27635', 1, 1)
end
if choix_sorts_27635 == 1 then
pUnit:RegisterEvent('spell1_27635', 1, 1)
end
if choix_sorts_27635 == 2 then
pUnit:RegisterEvent('spell2_27635', 1, 1)
end
if choix_sorts_27635 == 3 then
pUnit:RegisterEvent('spell3_27635', 1, 1)
end
if choix_sorts_27635 == 4 then
pUnit:RegisterEvent('spell4_27635', 1, 1)
end
end

function mob27635_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27635', math.random(1500, 3000), 1)
end

function mob27635_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27635_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27635_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27635, 1, 'mob27635_Action')
RegisterUnitEvent(27635, 2, 'mob27635_Leave')
RegisterUnitEvent(27635, 3, 'mob27635_Kill')
RegisterUnitEvent(27635, 4, 'mob27635_Die')
